package com.training.admin.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.annotation.Dao;
import com.training.admin.dao.TrainingSurveyResultDao;
import com.training.admin.entity.project.TrainingSurveyResult;
import com.training.admin.service.TrainingSurveyResultService;

/**
 * 
 * @author Rockett
 *
 */
@Service("trainingSurveyResultService")
public class TrainingSurveyResultServiceImpl extends DataServiceImpl<TrainingSurveyResult> implements TrainingSurveyResultService{


	@Dao
    private TrainingSurveyResultDao trainingSurveyResultDao;

	

	/*
	 * (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listByTraineeAndProjectPhase(java.lang.Long, java.lang.Long)
	 */
	public List<TrainingSurveyResult> listByTraineeAndProjectPhase(Long traineeId,Long projectPhaseId) {
		return trainingSurveyResultDao.listByTraineeAndProjectPhase(traineeId,projectPhaseId);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listByTraineeAndProjectPhaseAndCourse(java.lang.Long, java.lang.Long, java.lang.Long)
	 */
	public List<TrainingSurveyResult> listByTraineeAndProjectPhaseAndCourse(Long traineeId,Long projectPhaseId,Long projectPhaseCourseId) {
		return trainingSurveyResultDao.listByTraineeAndProjectPhaseAndCourse(traineeId,projectPhaseId,projectPhaseCourseId);
	}

	
	
	/*
	 * (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listByProjectPhase(java.lang.Long)
	 */
	public List<TrainingSurveyResult> listByProjectPhase(Long projectPhaseId) {
		return trainingSurveyResultDao.listByProjectPhase(projectPhaseId);
	}
    

	/*
	 * (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listByCourse(java.lang.Long)
	 */
	public List<TrainingSurveyResult> listByCourse(Long courseId) {
		return trainingSurveyResultDao.listByCourse(courseId);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listByProjectPhaseCourse(java.lang.Long)
	 */
	public List<TrainingSurveyResult> listByProjectPhaseCourse(Long projectPhaseCourseId) {
		return trainingSurveyResultDao.listByProjectPhaseCourse(projectPhaseCourseId);
	}
	
	/* (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#countByProject(java.lang.Long)
	 */
	public int countByProject(Long projectId) {
		return trainingSurveyResultDao.countByProject(projectId);
	}

	/* (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#avgByTrainer(java.lang.Long)
	 */
	public Double avgByTrainer(Long trainerId) {
		return trainingSurveyResultDao.avgByTrainer(trainerId);
	}

	/* (non-Javadoc)
	 * @see com.training.admin.service.TrainingSurveyResultService#listScoreByTrainer(java.lang.Long)
	 */
	@Override
	public List<TrainingSurveyResult> listScoreByTrainer(Long trainerId) {
		return trainingSurveyResultDao.listScoreByTrainer(trainerId);
	}  

}
